﻿using Abp.Application.Services;
using FwProject.Com.Dto;
using FwProject.ShopApplication;
using FwProject.ShoppingMall.EventAdvertising;
using Microsoft.AspNetCore.Mvc;
using System;
using System.Collections.Generic;
using System.Text;
using System.Threading.Tasks;
using X.PagedList;

namespace FwProject.Com.Dto
{
    /// <summary>
    /// 广告管理
    /// </summary>
   public interface IShopAdAppService : IApplicationService
    {
        #region 广告管理
        /// <summary>
        /// 创建广告
        /// </summary>
        /// <param name="Input">广告模型</param>
        /// <returns></returns>
        Task<Guid> CreateShopAdLocation(ShopAdInput Input);
        /// <summary>
        /// 修改广告
        /// </summary>
        /// <param name="Id">主键</param>
        /// <param name="Input">对象</param>
        /// <returns></returns>
        Task EditShopAdLocation(Guid Id, ShopAdInput Input);
        /// <summary>
        /// 删除广告
        /// </summary>
        /// <param name="Id"></param>
        /// <returns></returns>
        Task DeleteAdLocation(Guid Id);
        /// <summary>
        /// 获取广告信息
        /// </summary>
        /// <param name="page">页数</param>
        /// <param name="pageSize">条数</param>
        /// <param name="AdName">广告名称</param>
        /// <param name="beginTime">广告开始投放时间</param>
        /// <param name="endTime">广告结束时间</param>
        /// <param name="adTypeLocation">广告位</param>
        /// <param name="IsActive">是否可以投放</param>
        /// <returns></returns>
        Task<IPagedList<ShopAdDto>> GetPageList(int page, int pageSize, string AdName, DateTime? beginTime, DateTime? endTime, AdTypeLocation? adTypeLocation, bool? IsActive);
        #endregion

        #region 后台管理
        Task<ShopAdInput> GetEnterDtoAsync(Guid id);
        Task<LayerDataBaseDto> GetShopAdLayerDataAsync(int page, int limit, string keyword, Guid spaceid);

        /// <summary>
        /// 广告开关
        /// </summary>
        /// <param name="id"></param>
        /// <param name="active"></param>
        /// <returns></returns>
        Task SwitchActive(Guid id,bool active);
        #endregion
    }
}
